HttpClient-Klasse
Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
Vererbungshierarchie
System.Object
System.Net.Http.HttpMessageInvoker
System.Net.Http.HttpClient
Namespace: System.Net.Http
Assembly: System.Net.Http (in System.Net.Http.dll)
Syntax
'Declaration
Public Class HttpClient _
Inherits HttpMessageInvoker
'Usage
Dim instance As HttpClient
public class HttpClient : HttpMessageInvoker
public ref class HttpClient : public HttpMessageInvoker
type HttpClient =
class
inherit HttpMessageInvoker
end
public class HttpClient extends HttpMessageInvoker
Der HttpClient-Typ macht folgende Elemente verfügbar.
Konstruktoren
Name | Beschreibung | |
---|---|---|
HttpClient() | Initializes a new instance of the HttpClient class. | |
HttpClient(HttpMessageHandler) | Initializes a new instance of the HttpClient class with a specific handler. | |
HttpClient(HttpMessageHandler, Boolean) |
Zum Anfang
Eigenschaften
Name | Beschreibung | |
---|---|---|
BaseAddress | Gets or sets the base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests. | |
DefaultRequestHeaders | Gets the headers which should be sent with each request. | |
MaxResponseContentBufferSize | Gets or sets the maximum number of bytes to buffer when reading the response content. | |
Timeout | Gets or sets the number of milliseconds to wait before the request times out. |
Zum Anfang
Methoden
Zum Anfang
Threadsicherheit
Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.